<?php
header('Content-type:text/css');

$s=$_GET['s'];
if ($s)
{
    $arr=explode('.',$s);
    array_pop($arr);
    $arr=explode('/',$arr[0]);
    foreach ($arr as $val)
    {
        if ($val=='css'){
            continue;
        }
        $css_path=__DIR__.'/static/css/'.$val.'.css';

        $css=file_get_contents($css_path);
        echo $css;
    }
}else
{
    $d=dir(__DIR__.'/static/css');
    while($path=$d->read()) {
        if ($path == "." || $path == '..') continue;
        if (substr($path, -4, 4)==".css")
        {
            echo file_get_contents($d->path . '/' . $path)."\n";
        }
    }
    $d->close();

}
exit;
$s=$_GET['s'];
echo $s;exit;
$css_path=__DIR__.'/static/css/'.$s.'.css';


if(!file_exists($css_path)) exit;

$css_content=file_get_contents($css_path);
$css_content=str_replace("\r\n",' ',$css_content);
echo $css_content;